<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>张繁荣</h1>
    <script src="js/echarts.min.js"></script>
    <script src="js/china.js"></script>
    <div id="main" style="width: 600px; height: 400px"></div>
    <script type="text/javascript">
      var myChart = echarts.init(document.getElementById("main"));
      var option = {
        series: [
          {
            type: "graph",
            data: [
              {
                name: "张繁荣",
                x: 10,
                y: 50,
              },
              {
                name: "苏永权",
                x: 90,
                y: 50,
              },
              {
                name: "吴凯强",
                x: 91,
                y: 100,
              },
              {
                name: "郑闽毅",
                x: 10,
                y: 100,
              },
              {
                name: "陈杨",
                x: 75,
                y: 30,
              },
              {
                name: "陈逸华",
                x: -10,
                y: 70,
              },
            ],
            symbolSize: 70,
            label: {
              show: true,
            },
            links: [
              {
                source: "张繁荣",
                target: "苏永权",

                label: {
                  show: true,
                  formatter: "室友",
                  fontSize: 21,
                  color: "red",
                },
              },
              {
                source: "张繁荣",
                target: "吴凯强",

                label: {
                  show: true,
                  formatter: "室友",
                  fontSize: 21,
                  width: 5,
                  color: "red",
                },
              },
              {
                source: "苏永权",
                target: "吴凯强",

                label: {
                  show: true,
                  formatter: "室友",
                  fontSize: 21,
                  width: 5,
                  color: "red",
                },
              },
              {
                source: "郑闽毅",
                target: "张繁荣",

                label: {
                  show: true,
                  formatter: "室友",
                  fontSize: 21,
                  width: 5,
                  color: "red",
                },
              },
              {
                source: "郑闽毅",
                target: "吴凯强",

                label: {
                  show: true,
                  formatter: "室友",
                  fontSize: 21,
                  width: 5,
                  color: "red",
                },
              },
              {
                source: "张繁荣",
                target: "陈杨",

                label: {
                  show: true,
                  formatter: "朋友",
                  fontSize: 21,
                  width: 5,
                  color: "red",
                },
              },
              {
                source: "郑闽毅",
                target: "陈逸华",

                label: {
                  show: true,
                  formatter: "同学",
                  fontSize: 21,
                  width: 5,
                  color: "red",
                },
              },
              {
                source: "张繁荣",
                target: "陈逸华",

                label: {
                  show: true,
                  formatter: "同学",
                  fontSize: 21,
                  width: 5,
                  color: "red",
                },
              },
            ],
          },
        ],
      };
      myChart.setOption(option);
    </script>
  </body>
</html>